package com.example.a01;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class Component2 {
    private static final Logger logger = LoggerFactory.getLogger(Component2.class);

    @EventListener
    public void co2(UserRegisterEvent event) {
        logger.info("{}", event);
        logger.info("发送短信");
    }

}
